import config from "@/config";
import http from "@/utils/request";

export default {
	list: {
		url: `${config.API_LOCAL_URL}/sql/query`,
		name: "数据列表",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	tableList: {
		url: `${config.API_LOCAL_URL}/sql/query_table_list`,
		name: "数据库表列表",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	dbList: {
		url: `${config.API_LOCAL_URL}/sql/query_database_list`,
		name: "数据库列表",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	envList: {
		url: `${config.API_LOCAL_URL}/sql/query_env_list`,
		name: "环境列表",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	dataList: {
		url: `${config.API_LOCAL_URL}/sql/query`,
		name: "数据列表",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	query_log: {
		url: `${config.API_LOCAL_URL}/sql/record_log`,
		name: "记录查询",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
};
